package cn.tedu.demo.beans;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Student {
    private String name="小明";
    @Autowired
    private Pencil pencil;
    @Autowired
    private Ruler ruler;
    public Student(){
        System.out.println("创建了学生");
    }
    public void study(){
        System.out.println(name+"使用"+pencil+","+ruler+"学习!");
    }
}
